{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "def heatmap(data, row_labels, col_labels, ax=None,\n",
    "            cbar_kw={}, cbarlabel=\"\", **kwargs):\n",
    "    if not ax:\n",
    "        ax = plt.gca()\n",
    "\n",
    "    im = ax.imshow(data, **kwargs)\n",
    "    cbar = ax.figure.colorbar(im, ax=ax, **cbar_kw)\n",
    "    cbar.ax.set_ylabel(cbarlabel, rotation=-90, va=\"bottom\")\n",
    "    ax.set_xticks(np.arange(data.shape[1]))\n",
    "    ax.set_yticks(np.arange(data.shape[0]))\n",
    "    ax.set_xticklabels(col_labels)\n",
    "    ax.set_yticklabels(row_labels)\n",
    "    ax.tick_params(top=True, bottom=False, labeltop=True, labelbottom=False)\n",
    "    plt.setp(ax.get_xticklabels(), rotation=-30, ha=\"right\", rotation_mode=\"anchor\")\n",
    "    for edge, spine in ax.spines.items():\n",
    "        spine.set_visible(False)\n",
    "    ax.set_xticks(np.arange(data.shape[1]+1)-.5, minor=True)\n",
    "    ax.set_yticks(np.arange(data.shape[0]+1)-.5, minor=True)\n",
    "    ax.grid(which=\"minor\", color=\"w\", linestyle='-', linewidth=3)\n",
    "    ax.tick_params(which=\"minor\", bottom=False, left=False)\n",
    "    return im, cbar"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVAAAAEACAYAAADlZi4uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAaX0lEQVR4nO3de9QcZYHn8e/vfQlBQAQMSgAlouCREyDEwDK6KiAIw6wO7AIj7EIWXVABVxAdiDuujvc5qwOCXOZFLpFFEUXUARQYISCuIiFGrp7DglFuEhAYLsslwG//q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7EPuNiGhJ0k+BGV1uvg7wdNP7CdsTq+xvFnCJ7dnl+0dtb9j0+SO2B3IaP5It0IioL9urnnKvsXINNCJGzQOSZgKU/y4f1IESoBExan4MzC9fzwd+NKgD5RpoRKyxJH2H4obRDOAB4DPAD4ELgdcDfwQOsP3wQI6fAI2I6E1O4SMiepQAjYjoUQI0IqJHCdCIiB4lQCMiepQAjYjoUQI0IqJH/x+UNyqyPW93YgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "data = np.array([\n",
    "    [30, 20, 10,],\n",
    "    [10, 40, 15],\n",
    "    [12, 10, 20]\n",
    "])\n",
    "\n",
    "im, cbar = heatmap(data, ['Class-1', 'Class-2', 'Class-3'], ['A', 'B', 'C'], cmap='YlGn', cbarlabel='Number of Students')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def annotate_heatmap(im, data=None, valfmt=\"{x:.2f}\",\n",
    "                     textcolors=[\"black\", \"white\"],\n",
    "                     threshold=None, **textkw):\n",
    "    import matplotlib\n",
    "    if not isinstance(data, (list, np.ndarray)):\n",
    "        data = im.get_array()\n",
    "    if threshold is not None:\n",
    "        threshold = im.norm(threshold)\n",
    "    else:\n",
    "        threshold = im.norm(data.max())/2.\n",
    "    kw = dict(horizontalalignment=\"center\",\n",
    "              verticalalignment=\"center\")\n",
    "    kw.update(textkw)\n",
    "    if isinstance(valfmt, str):\n",
    "        valfmt = matplotlib.ticker.StrMethodFormatter(valfmt)\n",
    "    texts = []\n",
    "    for i in range(data.shape[0]):\n",
    "        for j in range(data.shape[1]):\n",
    "            kw.update(color=textcolors[im.norm(data[i, j]) > threshold])\n",
    "            text = im.axes.text(j, i, valfmt(data[i, j], None), **kw)\n",
    "            texts.append(text)\n",
    "\n",
    "    return texts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Ratan Singh\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:19: DeprecationWarning: In future, it will be an error for 'np.bool_' scalars to be interpreted as an index\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVAAAAEACAYAAADlZi4uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de7wVdb3/8dd7bxBDVAQEuYhYoWWoSHjJu3Lx0i/0+EMSO4qXwvsxM/Pyy5OXMjzl8XbEQlF3ZZpoinlBNEXMuxKp5O8XqZQIQtxSywvC5/fHzMYN7r3Xcu21Z4bV+9ljHqyZNd+Zz1q2P+s78/3O96uIwMzMPrm6vAMwM1tfOYGamVXICdTMrEJOoGZmFXICNTOrkBOomVmFnEAtN5L+XdJeecdRVJKUdwzWOrkfaPuS1B94LyIW5x1LkUjqDvwNeBp4EfjPiHgz36iKRdKngK2B3YD7/P0Uj2ug7aCx5iDpfwO3A09L8ne9tgZgn4j4EvAucK2kTjnHVBjpD+8vgR8CXwJ+J+n/5BuVrct/1O2js6T9gMuBR4F78He9hqRBwMFA53TTD4AOwBa5BVUgkjYDTgKWAKMj4hskSXRHSeNzDc7W0iHvAGrUucDGwClAJ+DwiPgw35CKIa2dTwVOBU6SNBGYBrwbEX/JNbjiGAF0Aa6KiJWSNoyIv0n6FvDpnGOzJpxAq0jShiSJ4QxgeEQ8KekO4Ofp+/URsSrPGAtgLPBsREwEJkq6BrgXeARAUl1ErM4zwAIYCiyLiBcBIuK99N/5kv6Wa2S2FifQKpHUEbgJeJ/kvueNku4F5gGLAf7Vk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KH1/LtD02uLcdHsDSSJc15BmtjU93wvATuXEZmbrl2rO6BERY5vZPLlKhy/Jj3KaWebWh6eMyuEEamYZq51n4Z1AzSxb8oDKZmYV8YDKZmZt4gRqZlYBUSsjaTqBmlnmfAlvZlYxJ1AzswoIVJ93EFXhBGpmmfMlvJlZxdyIZGZWIddAzcwq4G5MZmYVkxOomVklXAM1M2sD3wM1M6uIL+HNzCrmGqiZWQWUycTwWXACNbNMJeOB+lFOM7MKuQZqZlYBd2MyM2sD10DNzCribkxmZhURroGamVXMrfBmZhWR+4GamVWidi7ha+NOrpmtZ+rKXFon6QZJiyW91GRbN0kPSpqb/rtZe3wCyorQzKzqVOZS0k3AgetsOwf4bUQMBH6brreLmryE71g3JO8QCq5P3gEU3vB+J+cdQg1T1R7ljIiZkgass/kQYN/0dQMwAzi7KidchyKiPY5rZtYsSdOAHmXuviHwXpP1SRExaZ3jDQDuiYhB6fqKiOja5P3lEdEul/E1WQM1s+KKiHUvuddbvgdqZrVmkaTeAOm/i9vrRE6gZlZr7gbGpa/HAVPb60S+B2pm6y1Jt5A0GPUAFgHfA+4CbgP6A38FDo+IZe1yfidQM7PK+BLezKxCTqBmZhVyAjUzq5ATqJlZhZxAzcwq5ARqZlYhJ1Azswr9f9grZBWQyoA4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "im, cbar = heatmap(data, ['Class-1', 'Class-2', 'Class-3'], ['A', 'B', 'C'], cmap='YlGn', cbarlabel='Number of Students')\n",
    "\n",
    "texts = annotate_heatmap(im, valfmt=\"{x}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
